<template>
	<div class="swiper-container">
			<!-- 滑动内容区域 -->
			<div class="swiper-wrapper">
				<!-- 滑动项 -->
				<div class="swiper-slide" v-for='(item,index) in swiperList' :key='item.id'>
					<img :src="item.imgURL" />
				</div>
				
			</div>
			
		</div>
</template>

<script>
	import Swiper from 'swiper'
	export default{
		props:['swiperList'],//接收父组件传递的数组
			data(){
				return{
					swiperOptions:{
						//重复轮播
						//loop:true,
					},
				}
			},
			updated(){
				new Swiper ('.swiper-container' , {
					//重复轮播
					loop:true,
					observer:true,
					observeParents:true
				})
			}
		}
</script>

<style scoped>
	.swiper-container{
		width: 100%;
		height: 4.18rem;/*209px*/
	}
	.swiper-slide img{
		width: 100%;
		height: 100%;
	}
</style>
